 import axios from "axios"
 import ElementPlus from 'element-plus'
 import 'element-plus/dist/index.css'
 import { useCounterStore } from "@/stores/counter";


const service = axios.create({
  baseURL: "http://localhost:8080/",
});

//拦截器 添加token
service.interceptors.request.use((config) => {
    const store=useCounterStore();
  //添加token
  config.headers['token'] = store.token
  return config
});

export default service;